<template>
  <div class="container" @click="fly">
      <h1>抛物线小球</h1>
      <p>点击屏幕触发小球</p>
      <ball ref="balls" class="balls"></ball>
  </div>
</template>
<style lang="less" scoped>
.container{
    width: 100%;
    height:100vh;
}
.balls{
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
}
</style>

<script>
import ball from '../components/fly_ball/index'
export default {
  components:{
      ball
  },
  methods:{
      fly(e){
          console.log(e.pageX, e.pageY);
          this.$refs.balls.add(e.pageX, e.pageY);
      }
  }
}
</script>

